package org.mat.ipaas.ucenter.service.api.system;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mat.framework.lang.dto.MatApiResponse;
import org.mat.ipaas.ucenter.service.dto.system.vo.SysUserOnlineVODTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 在线用户
 * @Author: chenli
 * @Date: 2020-06-07
 * @Version: V1.0
 */
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "sys-user-online-rest-api")
public interface SysUserOnlineRestAPI {

    @RequestMapping(value = "/sys/online/list", method = RequestMethod.GET)
    MatApiResponse<Page<SysUserOnlineVODTO>> list(@RequestParam(name = "username", required = false) String username,
                                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);

    /**
     * 强退用户
     */
    @RequestMapping(value = "/sys/online/forceLogout",method = RequestMethod.POST)
    MatApiResponse<Object> forceLogout(@RequestBody SysUserOnlineVODTO online);
}
